package com.grpc.config;

import com.grpc.client.GrpcClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by 石头哥哥 on 9/5/16.
 * PACKAGE_NAME:  com.grpc.config
 * COMMENT :
 */
@Configuration
public class PropertiesConfig {

    /**
     *
     * @return
     */
    @Bean
    public GrpcClient grpcClient(@Value("${host}") String host,
                                 @Value("${port}") Integer port) {
        return new GrpcClient(host, port);
    }


}
